﻿@page "/"

<OneNotificationPerApp.Components.FirstComponent></OneNotificationPerApp.Components.FirstComponent>

<h3>Index Page</h3>

<button @onclick="@ShowNotification">Show Notification from Index Page</button>

@code {
    [CascadingParameter]
    protected Notification Notification { get; set; }

    void ShowNotification()
    {
        Notification.Instance.Show(new NotificationModel()
        {
            Text = "From Index Page. Go to the Counter Page and try the button there too",
            ThemeColor = ThemeColors.Success,
            CloseAfter = 0,
            Closable = true
        });
    }
}